﻿Module conexiones
    Public tipo As Integer = 1

    Public Sub ConectaBd(ByRef MyConnection As SqlClient.SqlConnection)
        MyConnection = New SqlClient.SqlConnection
        Dim strr As String
        'strr = "Persist Security Info=False;User ID=sa;Password=abc-123;Initial Catalog=ERPSC;Server=WIN-7YKAYMXBLNE"
        'strr = "Data Source=WIN-7YKAYMXBLNE;Initial Catalog=prueba2;Integrated Security=True;User ID=sa;Password=abc-123;"
        'strr = "Persist Security Info=False;User ID=sa;Password=RM_2011;Initial Catalog=ERPSC;Server=SRVSC"
        strr = "Persist Security Info=False;User ID=sa;Password=abc-123;Initial Catalog=sanofis;Server=WIN-7YKAYMXBLNE"

        MyConnection.ConnectionString = strr
        MyConnection.Open()

        If MyConnection.State = ConnectionState.Closed Then
            MsgBox("Fue imposible conectar a la BD, Contactese con un Administrador", MsgBoxStyle.Exclamation, "Conexion a BD")
        End If
    End Sub
End Module